/*
 * Copyright 2010 Christoph Widulle (christoph.widulle@googlemail.com)
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
 * License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
 * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */



package org.amarena2d.examples.scenes;

import com.android1.amarena2d.nodes.FontNode;
import com.android1.amarena2d.nodes.Scene;
import com.android1.amarena2d.texture.BitmapFont;
import com.badlogic.gdx.graphics.Color;
import org.amarena2d.examples.Example;


@Example(name = "Default Font", category = "Font")
public class FontExampleScene extends Scene {


    public FontExampleScene() {


        FontNode defaultFontNode = new FontNode(engine.getFontManager().getDefaultFont());
        FontNode customFontNode = new FontNode(engine.getFontManager().getFont("impact.fnt", "impact.png"));

        defaultFontNode.createLabel().setText("ARIAL-15 Default Font").xy(20, 300);
        customFontNode.createLabel().setText("IMPACT-56 Custom Font").xy(20, 250);
        customFontNode.createLabel().setText("IMPACT-56 Colored Blue").xy(20, 200).setColor(Color.BLUE);
        customFontNode.createLabel().setText("IMPACT-56 Alpha 0.5F").xy(20, 180).color(Color.RED).alpha(0.5F);

        defaultFontNode.createLabel().setText("ARIAL-15 Multiline Text\nNext Line").xy(20, 150).setMultiLine(true);

        customFontNode.createLabel().setText("IMPACT-56 \nCentered Text").xy(260, 100).setAlign(BitmapFont.HAlignment.CENTER).setMultiLine(true);

        add(defaultFontNode, customFontNode);

    }

}